factory/server: optional system_prompt for the agent (live runtime context)#4
Open
Bowenislandsong wants to merge 2 commits into
Open
factory/server: optional system_prompt for the agent (live runtime context)#4Bowenislandsong wants to merge 2 commits into
Bowenislandsong wants to merge 2 commits into
Conversation
…ontext) create_controller and AgentServerApp now accept system_prompt -> ContextBuilder, so a host (Agentica) can give the agent a proper system prompt plus live context (current date/time, OS) instead of the placeholder "small agent runtime demonstration". Backward compatible (defaults preserve prior behavior). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ancel token - UrllibWebClient.get_text now rejects non-public hosts (loopback/private/link-local/ metadata) before any request -> closes the fetch_url/search_web SSRF pivot. - AgentController.run / AgentSession.ask / AgentServerApp.chat take a cancel_event (threading.Event) checked at each step boundary + before each tool dispatch, so a voice barge-in actually stops the agent loop (no further model calls or tools). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Threads an optional system_prompt through
create_controller→AgentController(context_builder=ContextBuilder(...))andAgentServerApp. Additive (+6 lines, factory.py + server.py); when unset, behavior is unchanged.Why: the Agentica release pipeline
pip installs AgenticLocal from this repos main, then passes a runtime preamble (live date/time/timezone, OS/arch, workspace) as the agent system prompt so the local model knows "now" and where it is running. Until this lands on main, CI-built releases lack the agentic-mode preamble (plain chat + planner already have it via agentica-core). Merging makes CI releases match the hand-built v0.1.2.